﻿using FastUtil.Base;
using ICSharpCode.SharpZipLib.Checksums;
using ICSharpCode.SharpZipLib.Zip;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace FastUtil.Base
{
    public class FileUtil : BaseUtil
    {
        public static void SaveFile(string FileFullName, byte[] FileContent)
        {
            using (FileStream fileStream = File.Create(FileFullName))
            {
                fileStream.Write(FileContent, 0, FileContent.Length);
                fileStream.Close();
            }
        }

        public static void SaveString2File(string FileFullName, string Content)
        {
            using (System.IO.StreamWriter file = new System.IO.StreamWriter(FileFullName, false, Encoding.UTF8))
            {
                //开始写入
                file.WriteLine(Content);
            }
        }

        public static string ReadFileContent(string FileFullName)
        {
            return File.ReadAllText(FileFullName, Encoding.UTF8);
        }

    }
}
